/* 商务风格名片管理系统样式 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #343a40;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --transition-speed: 0.3s;
    --border-radius: 0.375rem;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    box-shadow: var(--shadow-md);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed);
    border-radius: var(--border-radius);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-text {
    color: rgba(255, 255, 255, 0.85);
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all var(--transition-speed);
    padding: 0.5rem 1.25rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: #95a5a6;
    border-color: #95a5a6;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    margin-right: 0.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-medium);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* 名片夹样式 */
.folder-card {
    cursor: pointer;
    transition: all var(--transition-speed);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.folder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--secondary-color);
    transition: all var(--transition-speed);
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.folder-card:hover::before {
    height: 7px;
}

.folder-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: all var(--transition-speed);
}

.folder-card:hover .folder-icon {
    transform: scale(1.1);
}

.folder-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-top: 0.5rem;
    transition: all var(--transition-speed);
}

.action-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.folder-card:hover .action-buttons {
    display: flex;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    margin: 0 0.1rem;
    font-size: 0.8rem;
}

/* 名片列表样式 */
.table {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background-color: var(--gray-light);
    border-top: none;
    border-bottom: 2px solid var(--gray-medium);
    color: var(--dark-color);
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--gray-medium);
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 卡片操作按钮样式 */
.card-actions {
    white-space: nowrap;
}

.btn-card-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 0.25rem;
    transition: all var(--transition-speed);
}

.btn-card-action:hover {
    transform: translateY(-2px);
}

/* 标签页样式 */
.nav-tabs {
    border-bottom: 2px solid var(--gray-medium);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--gray-dark);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-speed);
}

.nav-tabs .nav-link:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.nav-tabs .nav-link.active {
    color: var(--secondary-color);
    background-color: transparent;
    border-bottom: 2px solid var(--secondary-color);
}

.tab-pane {
    padding: 1.5rem 0;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background-color: var(--gray-light);
    border-bottom: 1px solid var(--gray-medium);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-medium);
    padding: 1.25rem 1.5rem;
}

/* 表单样式 */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-medium);
    padding: 0.5rem 0.75rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Toast消息样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    min-width: 300px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: none;
    overflow: hidden;
}

.toast-header {
    padding: 0.75rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid var(--gray-medium);
}

.toast-body {
    padding: 1rem;
    background-color: #fff;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
}

.empty-state-text {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .folder-card {
        padding: 1.5rem 1rem;
    }
    
    .folder-icon {
        font-size: 3rem;
    }
    
    .folder-name {
        font-size: 1rem;
    }
    
    .card-actions {
        display: flex;
        justify-content: flex-end;
    }
    
    .btn-card-action {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem;
    }
}

/* 打印样式优化 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table thead th {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
}